"use client";
import ErrorFallback from "@/components/ErrorFallback";
import Page1 from "@/components/Page1";
import Page2 from "@/components/Page2";
import Page3 from "@/components/Page3";
import Page4 from "@/components/Page4";
import Page5 from "@/components/Page5";

import React, { ErrorInfo } from "react";
import { ErrorBoundary } from "react-error-boundary";

const onError = (error: Error, info: ErrorInfo) => {
  console.log("错误信息:", error.message);
  console.log("组件栈:", info.componentStack);
};
export default function App() {
  return (
    <>
      <Page1 />
      <Page2 />
      <ErrorBoundary FallbackComponent={ErrorFallback} onError={onError}>
        <Page3 />
      </ErrorBoundary>
    </>
  );
}
